﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace tarningar
{
    class Program
    {
        static void Main(string[] args)
        {
            dice[] d = new dice[10];
            for (int i = 0; i < d.Length; i++)
            {
                d[i] = new dice();
            }

            foreach (dice a in d)
            {
                a.ThrowDice();
            }

            PrintDice(d);

            Console.ReadLine();
        }

        static void PrintDice(dice[] d)
        {
            //draws all dice from left to right on a single row.

            foreach (dice a in d)
            {
                Console.Write("----- ");
            }
            Console.Write("\n");

            foreach (dice a in d)
            {
                Console.Write("|");
                switch (a.Read())
                {
                    case 1:
                        Console.Write("   ");
                        break;
                    case 2:
                    case 3:
                        Console.Write("X  ");
                        break;
                    case 4:
                    case 5:
                    case 6:
                        Console.Write("X X");
                        break;
                    default:
                        break;
                }
                Console.Write("| ");
            }
            Console.Write("\n");

            foreach (dice a in d)
            {
                Console.Write("|");
                switch (a.Read())
                {
                    case 1:
                        Console.Write(" X ");
                        break;
                    case 2:
                        Console.Write("   ");
                        break;
                    case 3:
                        Console.Write(" X ");
                        break;
                    case 4:
                        Console.Write("   ");
                        break;
                    case 5:
                        Console.Write(" X ");
                        break;
                    case 6:
                        Console.Write("X X");
                        break;
                    default:
                        break;
                }
                Console.Write("| ");
            }
            Console.Write("\n");

            foreach (dice a in d)
            {
                Console.Write("|");
                switch (a.Read())
                {
                    case 1:
                        Console.Write("   ");
                        break;
                    case 2:
                    case 3:
                        Console.Write("  X");
                        break;
                    case 4:
                    case 5:
                    case 6:
                        Console.Write("X X");
                        break;
                    default:
                        break;
                }
                Console.Write("| ");
            }
            Console.Write("\n");

            foreach (dice a in d)
            {
                Console.Write("----- ");
            }
            Console.Write("\n");
        }
    }
}
